<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'tbl-galeria-form',
        'enableAjaxValidation'=>true,
        'htmlOptions'=>array('enctype'=>'multipart/form-data'),
));
?>

	<p class="note">Os campos com <span class="required">*</span> são obrigatórios.</p>

	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'id_author'); ?>
		<?php echo $form->textField($model,'id_author',array("readonly"=>"readonly",'value'=>Yii::app()->user->id)); ?>
		<?php echo $form->error($model,'id_author'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'author'); ?>
		<?php echo $form->textField($model,'author',array("readonly"=>"readonly",'value'=>Yii::app()->user->name)); ?>
		<?php echo $form->error($model,'author'); ?>
	</div>
	<div class="row">
		<?php echo CHtml::activeLabel($model,'link'); ?>
		<?php echo CHtml::activeFileField($model,'link',array('size'=>60,'maxlength'=>200,'allowEmpty'=>true)); ?>
		<?php echo $form->error($model,'link'); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->